<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Lista de Usuarios</title>
</head>
<body>
<h1>Lista de Usuarios</h1>

<table border="1">
	<tr>
		<td>N</td>
		<td>Username</td>
		<td>Nombre</td>
	</tr>
	<c:forEach items="${usuarios}" var="usuario" varStatus="varStatus">
		<tr>
			<td>${varStatus.count}</td>
			<td>${usuario.username}</td>
			<td>${usuario.nombre}</td>
			<sec:authorize access="hasRole('ROLE_ADMIN')">
				<td><a href="eliminar.htm?username=${usuario.username}">Eliminar</a>
				</td>
			</sec:authorize>
		</tr>
	</c:forEach>
</table>

</body>
</html>